Abstract Animals combine sensory information from their environment with their previous experience and internal state to select among the many different motor behaviors they can perform, but the neural circuits in their brains that enable them to make appropriate choices remain unknown. Our long-term goal is to define the complete neural circuit, from sensory inputs to motor outputs, which governs the sequential selection and execution of the individual cleaning movements that constitute grooming behavior in Drosophila. Here, we identify the combination of sensory inputs that provide the drive to clean, investigate how one motor program is chosen while others are prevented, and define which neurons enable grooming sequence progression. We will use the strengths of our system to map the precise neurons and connections that control this innate motor sequence. Fly grooming behavior provides the opportunity for a detailed interrogation of the neural circuit motifs that form the basic functional units of all nervous systems. Just as a computer is composed of many microprocessors, a brain contains repeated modules of connected neurons, and the ways those neurons connect enables them to perform specific comparisons and logical operations. Our experiments will show how sensory neurons integrate different types of information and compare stimulus strength across space and time. We will determine which neurons constitute the central pattern generators that activate motor neurons in order and how they arbitrate between actions that cannot be performed simultaneously. Inhibitory neurons may impinge anywhere between sensory inputs and motor outputs to establish a hierarchy and ensure that the highest priority action occurs first: we will define the critical processing layers for this regulation. Higher-order neurons that descend from the brain to the ventral nervous system modulate the hierarchy to permit sequence progression; we will map these control circuits. Organizing complex behavioral sequences is a problem common to all animals and defining the neural circuits that accomplish it in a simpler system will provide a template for understanding how these functions are achieved in all brains, and how they are disrupted in diseases ranging from Obsessive Compulsive Disorder to Parkinson's disease.